<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>个人信息</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" type="text/css" href="../../common/plugins/layui/css/layui.css" media="all">
    <link rel="stylesheet" type="text/css" href="../../common/css/global.css" media="all">
    <link rel="stylesheet" type="text/css" href="../css/common.css" media="all">
    <link rel="stylesheet" type="text/css" href="../css/personal.css" media="all">
    <link rel="stylesheet" type="text/css" href="../css/file.css">
    <!--麻痹  不知道为什么写layui.js 然后layer的样式文件加载失败 卧槽--->
    <script type="text/javascript" src="../../common/plugins/layui/layui.all.js"></script>
    <script type="text/javascript" src="../../common/plugins/layer/layer.js"></script>


</head>
<body>
<section class="larry-grid">
    <div class="larry-personal">
        <header class="larry-personal-tit">
            <span>文件上传</span>
        </header>
        <div class="larry-personal-body clearfix">
            <form class="layui-form col-lg-5" enctype="multipart/form-data" action="http://127.0.0.1:10000/file/upload" method="post">

                <div class="layui-form-item">
                    <label class="layui-form-label">上传路径</label>
                    <div class="layui-input-block">
                        <input type="text" name="uploadDir" autocomplete="off" class="layui-input"
                               placeholder="以/开头 /结尾">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">文件</label>
                    <div class="file">
                        <div class="userdefined-file">
                            　　<input type="text" name="userdefinedFile" id="userdefinedFile" value="未选择任何文件">
                        </div>
                        <input type="file" name="file" id="file">
                    </div>
                </div>

                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">文件描述</label>
                    <div class="layui-input-block">
                        <textarea placeholder="文件描述" value="" class="layui-textarea" name="remark"></textarea>
                    </div>
                </div>


                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button class="layui-btn" lay-submit="" lay-filter="formSubmit">立即提交</button>
                        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <!--<div class="layui-form-item">-->
        <!--<div class="layui-input-block">-->
            <!--<div class="layui-upload">-->
                <!--<button type="button" class="layui-btn layui-btn-normal"-->
                        <!--id="testList">选择多文件</button>-->
                <!--<div class="layui-upload-list">-->
                    <!--<table class="layui-table">-->
                        <!--<colgroup>-->
                            <!--<col width="25%">-->
                            <!--<col width="25%">-->
                            <!--<col width="25%">-->
                            <!--<col width="25%">-->
                        <!--</colgroup>-->
                        <!--<thead>-->
                        <!--<tr>-->
                            <!--<th>文件名</th>-->
                            <!--<th>大小</th>-->
                            <!--<th>状态</th>-->
                            <!--<th>操作</th>-->
                        <!--</tr>-->
                        <!--</thead>-->
                        <!--<tbody id="demoList"></tbody>-->
                    <!--</table>-->
                <!--</div>-->
                <!--<button type="button" class="layui-btn" id="testListAction">开始上传</button>-->
            <!--</div>-->
        <!--</div>-->
    <!--</div>-->

</section>

<script type="text/javascript" src="../js/file.js"></script>
<script src="https://cdn.bootcss.com/jquery/2.2.4/jquery.min.js"></script>


<script type="text/javascript">


    <!--得到上传的文件名-->
    document.getElementById("file").onchange = function () {
        document.getElementById("userdefinedFile").value = document.getElementById("file").value;
    }
</script>

</body>
</html>